package com.liuqi.openai.retrieve.bm25;

/**
 * @author liuqi
 * @date 2025/8/7
 **/
public class BM25SearchResult<T> {

    /**
     * 文档索引
     */
    private final int docId;

    /**
     * 相似度分数
     */
    private final double score;

    /**
     * 数据
     */
    private final T data;

    public BM25SearchResult(int docId, double score, T data) {
        this.docId = docId;
        this.score = score;
        this.data = data;
    }

    public int getDocId() {
        return docId;
    }

    public double getScore() {
        return score;
    }

    public T getData() {
        return data;
    }

    @Override
    public String toString() {
        return "BM25SearchResult{" +
                "docId=" + docId +
                ", score=" + score +
                ", data=" + data +
                '}';
    }
}
